<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

?>
<?php if ($dibujar):?>
<table>
    <thead>
      <tr>
          <th>ITEM</th>
          <th>INFORME</th>
          <TH>PRECIO</TH>
          <th>CANTIDAD</th>
          <th>% I.V.A</th>
          <th>I.V.A</th>
          <th>SUB TOTAL</th>
          <TH>ELIMINAR<TH>
      </tr>
    </thead>
    <tbody>
        <?php $e =1 ;$totalprecio = 0 ;$totaliva = 0; foreach($listadefallas as $fallas): ?>
        <tr>
            <td><?php echo $e++ ?></td>
            <td><?php echo $fallas->getdetalleinforme()?> </td>
            <td><?php echo $fallas->getprecio();$totalprecio += $fallas->getprecio() ?>
            <TD>CANTIDAD</TD>
            <td><?php echo $fallas->getIva()?></td>
            <td><?php echo ($fallas->getprecio() * $fallas->getIva())/100; $totaliva += ($fallas->getprecio() * $fallas->getIva())/100 ?></td>
            <td><?php echo ($fallas->getprecio() * $fallas->getIva())/100 + $fallas->getprecio() ?>
            <TD>IMPLEMENTAR BOTON BORRAR<TD>
            
        </tr>
        <?php endforeach;?>
    </tbody>
</table>
<table>
    <tr>
        <td>
            <label>TOTAL NETO:</label>
            <INPUT type="TEXT" readonly="TRUE" id="NETO" value="<?PHP ECHO $totalprecio?>">
            <label>TOTAL IVA:</label>
            <INPUT type="TEXT" readonly="TRUE" id="TOTALIVA" value="<?PHP ECHO $totaliva?>">
            <label>TOTAL GENERAL:</label>
            <INPUT type="TEXT" readonly="TRUE" id="TOTALGENERAL" value="<?PHP ECHO $totaliva + $totalprecio?>" >
        </td>
    </tr>
</table>
<?php endif;?>
